package com.clay.appointment.dict.client;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author : clay
 * @Description:
 * @Date: Create in 14:15 2021/8/10
 * @Modified By:
 */
@FeignClient("service-dict")
@Repository
public interface DictFeignClient {

    @ApiOperation(value = "根据上级编码和值获取数据字典名称")
    @GetMapping(value = "/dict/getName/{parentDictCode}/{value}")
     String getName(
            @ApiParam(name = "parentDictCode", value = "上级编码", required = true)
            @PathVariable("parentDictCode") String parentDictCode,
            @ApiParam(name = "value", value = "值", required = true)
            @PathVariable("value") String value) ;



    @ApiOperation(value = "根据值获取数据字典名称")
//    @ApiImplicitParam(name = "value", value = "值", required = true, dataType = "Long", paramType = "path")
    @GetMapping(value = "/dict/getName/{value}")
     String getName(
            @ApiParam(name = "value", value = "值", required = true)
            @PathVariable("value") String value);

}
